//质数和分解 一维完全背包
#include <iostream>
#include <cstring>
using namespace std;
const int MAXN=200;
bool notPrime[MAXN+1];
int primes[MAXN];
int primeCount;
int n;
long long solunum[MAXN+1];

int main(){
    for(int i=2;i<=MAXN;i++)
        if (!notPrime[i]){
            primeCount++;
            primes[primeCount]=i;
            for(int k=2;i*k<=MAXN;k++) notPrime[i*k]=true;
        }
    while(cin>>n){
        memset(solunum,0,sizeof(solunum));
        solunum[0]=1;
        for(int i=1;i<=primeCount;i++){
            for(int v=primes[i];v<=n;v++)
                solunum[v]+=solunum[v-primes[i]];
        }
        cout<<solunum[n]<<endl;
    }
}
